clear all
close all

P = [1,2,4,8,16];
marker = {'-.r', '--g', '-c', '-b', '-r'};

figure
for i = 1:length(P)
    p = P(i);
    a = importdata(['../cpp/test_' num2str(p)]);
    semilogy(a(:,2), a(:,3), marker{i}, 'LineWidth', 2); hold on
end
legend('MultNMF P = 1', 'MultNMF P = 2', 'MultNMF P = 4', ...
       'MultNMF P = 8', 'MultNMF P = 16', ...
       'Location', 'NorthEast');
xlabel('time (s)')
ylabel('Relative error |WH^T-A|_F / |A|_F')
title('1000 \times 1000');

print(gcf, '-depsc', '-r300', '../figures/test.eps');
